# define sample method
# 
# Author: guochun
###############################################################################

#define the root sample class
setClass("sample",representation(time="numeric", overlap="logical", stopLimit="numeric",
				success="logical", edge="numeric"),
		prototype(overlap=T,time=10,stopLimit=200,success=T,edge=5))

###########################################
#define a quadrat class
setClass("quadrat",representation(area="numeric"),prototype(area=numeric()),
		contains="sample")

#define a rectangle quadrat class
setClass("rectangle",representation(a="numeric",b="numeric"),contains="quadrat")

#define a circle quadrat class
setClass("circle",representation(r="numeric"),contains="quadrat")

#############################################
#define a distance sample class
setClass("distance",contains="sample",representation(k="numeric",truncated="logical",R="numeric",
				slope="numeric",b="numeric",
				xrange="vector",d="numeric",transectLine="logical",
				nonparametric="logical"),
		prototype(k=1,truncated=FALSE,slope=numeric(),
				b=numeric(),xrange=vector(),d=numeric(),transectLine=FALSE,
				nonparametric=FALSE))

#define event-to-event distance class
setClass("eToe",contains="distance")

#define point-to-event distance class
setClass("pToe",contains="distance",representation(slope="numeric",b="numeric",
				xrange="vector",d="numeric",transectLine="logical",
				nonparametric="logical"),prototype(slope=numeric(),
				b=numeric(),xrange=vector(),d=numeric(),transectLine=FALSE,
				nonparametric=FALSE))

#define digle composite distance class
setClass("diggleCp",contains="distance")

#define T-square sample class
setClass("tSquare",contains="distance",representation(composite="logical"),prototype(composite=FALSE))

#define point square sample class
setClass("pQuarter",representation(slope="numeric",b="numeric",
				xrange="vector",d="numeric",transectLine="logical"),contains="distance",
		prototype(slope=numeric(),b=numeric(),xrange=vector(),d=numeric(),transectLine=TRUE))

#define a general sample class
setClass("angleOrder",contains="distance",
		representation(focusType="character",q="numeric",k="numeric",n="numeric",
				composite="logical",transectLine="logical",visual="logical"),
		prototype(focusType="point",q=1,k=1,n=50,composite=FALSE,
				transectLine=FALSE,visual=FALSE))

